import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        double a = in.nextDouble();
        char b = in.nextLine().charAt(0);
        int ret = 0;
        if(a <= 1){
            ret = 20;
        }else{
            ret = 20 + (int)Math.ceil(a-1);
        }
        if(b == 'y'){
            ret +=5;
        }
        System.out.println(ret);
    }
}